package com.sharp.authorization.dao.common.entity;

import com.sharp.kernel.config.db.key.SequenceGenId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.persistence.*;
import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;

/**
 * Title: AcPermit
 * Description: Copyright: Copyright (c) 2019 Company: BHFAE
 *
 * @author Sharp
 * @date 2022/6/28 14:24
 */

/**
 * 权限表
 */
@ApiModel(value = "com-sharp-authorization-dao-common-entity-AcPermit")
@Data
@Table(name = "ac_permit")
public class AcPermit {
    /**
     * 权限ID
     */
    @Id
    @Column(name = "id")
    @ApiModelProperty(value = "权限ID")
    @KeySql(genId = SequenceGenId.class)
    private String id;

    /**
     * 父权限ID
     */
    @Column(name = "parent_permit_id")
    @ApiModelProperty(value = "父权限ID")
    private String parentPermitId;

    /**
     * 权限类型 MENU|BUTTON
     */
    @Column(name = "permit_type")
    @ApiModelProperty(value = "权限类型 MENU|BUTTON")
    private String permitType;

    /**
     * 权限名称
     */
    @Column(name = "`name`")
    @ApiModelProperty(value = "权限名称")
    private String name;

    /**
     * 权限KEY 下划线式驼峰命名
     */
    @Column(name = "`key`")
    @ApiModelProperty(value = "权限KEY 下划线式驼峰命名")
    private String key;

    /**
     * 客户端类型
     */
    @Column(name = "client_type")
    @ApiModelProperty(value = "客户端类型")
    private String clientType;

    /**
     * URL
     */
    @Column(name = "url")
    @ApiModelProperty(value = "URL")
    private String url;

    /**
     * 显示名称
     */
    @Column(name = "show_name")
    @ApiModelProperty(value = "显示名称")
    private String showName;

    /**
     * 显示顺序
     */
    @Column(name = "show_order")
    @ApiModelProperty(value = "显示顺序")
    private Integer showOrder;

    /**
     * 状态 0 禁用 1 可用
     */
    @Column(name = "`status`")
    @ApiModelProperty(value = "状态 0 禁用 1 可用")
    private String status;

    /**
     * 创建时间
     */
    @Column(name = "create_at")
    @ApiModelProperty(value = "创建时间")
    private Date createAt;

    /**
     * 修改时间
     */
    @Column(name = "update_at")
    @ApiModelProperty(value = "修改时间")
    private Date updateAt;

    /**
     * 图标
     */
    @Column(name = "icon")
    @ApiModelProperty(value = "图标")
    private String icon;

    /**
     * 有效性
     */
    @Column(name = "`valid`")
    @ApiModelProperty(value = "有效性")
    private String valid;
}
